#!/srv/newsblur/venv/newsblur3/bin/python

import os

from vendor.munin.cassandra import MuninCassandraPlugin


class CassandraLoadPlugin(MuninCassandraPlugin):
    title = "load (data stored in node)"
    args = "--base 1024 -l 0"
    vlabel = "bytes"
    fields = [
        ('load', dict(
            label = "load",
            info = "data stored in node",
            type = "GAUGE",
            min = "0",
        )),
    ]
    
    def execute(self):
        info = self.cinfo()
        return dict(load = info['Load'])

if __name__ == "__main__":
    CassandraLoadPlugin().run()
